<?php
  header("Content-Type: text/html; charset=utf-8");
  //regelt alle seiten
  if(isset($_GET['key']))
  {
	if($_GET['key'] == "home")
	{
		//home
		header( "HTTP/1.1 301 Moved Permanently" );
		header( "Location: ./" ); 
	}
	else
	{
		//andere seite
		require_once("main.php");
	}
  }
  else
  {
	$domain = $_SERVER['REQUEST_URI'];
	if (strpos($domain,'index.php')===false)
	{
		require_once("home.php");
	}
	else
	{
		header( "HTTP/1.1 301 Moved Permanently" );
		header( "Location: ./" );
	}
  }
?>